package com.mooc.lib_sofa

import com.mooc.lib_common.model.FeedDissEntity
import com.mooc.lib_common.model.FeedLikeEntity
import com.mooc.lib_common.model.FeedShareEntity
import com.mooc.lib_network.entity.BaseEntity
import com.mooc.lib_common.model.HomeFeedEntity
import retrofit2.http.GET
import retrofit2.http.Query

interface ApiService {

    @GET("feeds/queryHotFeedsList")
    suspend fun requestHomeList(@Query("feedId")feedId : Int,
                                @Query("feedType")feedType:String,
                                @Query("pageCount")pageCount:Int,
                                @Query("userId")userId:Int):
            BaseEntity<HomeFeedEntity>
    //帖子喜欢接口
    @GET("ugc/toggleFeedLike")
    suspend fun requestLike(@Query("itemId")itemId : Long,
                            @Query("userId")userId:Int):
            BaseEntity<FeedLikeEntity>
    //帖子踩接口
    @GET("ugc/dissFeed")
    suspend fun requestDiss(@Query("itemId")itemId : Long,
                            @Query("userId")userId:Int):
            BaseEntity<FeedDissEntity>
    //变更分享数量
    @GET("ugc/increaseShareCount")
    suspend fun requestShare(@Query("itemId")itemId : Long):
                             BaseEntity<FeedShareEntity>
}